<template>
	<view class="tiyanPage">
		<view class="tyTitle">推广区(限购)</view>
		<view class="flex align-center justify-between">
			<image @click="totg(2,1)" lazy-load mode="aspectFill" class="tyimg" v-if="imagel" :src="imagel"></image>
			<!--  @click="totg(2,2)" -->
			<image @click="opening" lazy-load mode="aspectFill" class="tyimg" v-if="imager" :src="imager"></image>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			imagel:'',
			imager:'',
			mch_id:'',
			p_id:''
		},
		created() {
			// let that = this;
			// that.$request({
			//     url: that.$api.index.config,
			// }).then(response=>{
			//     that.$hideLoading();
			//     if(response.code == 0) {
			//         that.vip_card = response.data.plugin.vip_card;
			//         that.svipImg = response.data.__wxapp_img.vip_card;
			//         if(that.value) {
			//             that.vip_card.setting.form = that.value;
			//         }
			//     }
			// })
		},
		methods: {
			totg(type,id) {
				if(id == 1){
					var mch_id = this.mch_id
				}else{
					var mch_id = this.p_id
				}
				uni.navigateTo({
					url: '/plugins/jimai/tgList?type='+type+'&p_mch_id='+ mch_id
				})
			},
			opening(){
				uni.showToast({
					icon:'none',
					title:'开发中',
					duration:1500
				})
			}
		},
	}
</script>

<style scoped>
	.tyimg {
		width: 345upx;
		height: 220upx;
		border-radius: 10upx;
	}

	.tyTitle {
		padding-left: 20upx;
		border-left: 6upx solid #ff9853;
		line-height: 34upx;
		font-size: 30upx;
		height: 34upx;
		margin-bottom: 10upx;
	}

	.tiyanPage {
		width: 710upx;
		margin: 40upx auto 0;
	}
</style>
